<%-- 
    Document   : principal
    Created on : 07/11/2012, 01:21:57 PM
    Author     : Izhar Gamaliel Hernandez Cruz
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>

<%@ taglib uri="/struts-tags" prefix="s" %>

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <link type="text/css" rel="stylesheet" href="${pageContext.request.contextPath}/css/estilo.css" />
  		<link rel="stylesheet" href="${pageContext.request.contextPath}/Js/datatable/css/demo_page.css" type="text/css">
		<link rel="stylesheet" href="${pageContext.request.contextPath}/Js/datatable/css/demo_table.css" type="text/css">
		<link rel="stylesheet" href="${pageContext.request.contextPath}/Js/datatable/css/demo_table_jui.css" type="text/css">
		<link rel="stylesheet" href="../themes/smoothness/jquery-ui-1.8.4.cu.stom.css" type="text/css">
		
		<script src="${pageContext.request.contextPath}/Js/jquery-1.8.2.js"></script>
		<script src="${pageContext.request.contextPath}/Js/datatable/js/jquery.dataTables.min.js"></script>
        
         <script type="text/javascript">
        $(document).ready(function () {
            $("#companies").dataTable({
                "bServerSide": true,
                "sAjaxSource": "ajaxSearch",
                "bProcessing": true,
                "sPaginationType": "full_numbers",
                "bJQueryUI": true
            });
        });
        </script>
        <title>Main ho</title>
    </head>
    <body>
        
        <s:div cssClass="contenidoAzul">
            <jsp:include page="/jsp/encabezado.jsp" flush="true" />
            <s:div cssClass="divBlanco"></s:div>
            <s:div cssClass="contenidoFormLogin"></s:div>
        </s:div>
       <div id="container" style="margin: auto;">
            <div id="demo_jui">
          <table id="companies" class="display">
                <thead>
                    <tr>
                         <th width="220px">KNKEY</th>
                         <th>Company Name</th>
                         <th width="35%">Status</th>
                         <th>Creation Date</th>
                         <th>Updated</th>
                         
                    </tr>
                </thead>
                <tbody>
                </tbody>
          </table>
         </div>
        </div>
        
        
        <s:div align="center">
            <s:form action="SelectComboKnkey">
                <div align="center">
                    <table border="1" class="listado2">
                        <tr style="background: lightskyblue">
                            <td>
                                KNKEY
                            </td>
                            <td>
                                Company Name
                            </td>
                            <td>
                                Status
                            </td>
                            <td>
                                Creation Date
                            </td>
                            <td>
                                Updated
                            </td>
                            <td>
                                Action
                            </td>
                        </tr>
                        <s:iterator value="listaTablaBeans">
                            <tr>
                                <td>
                                    <s:property value="knkey"/>
                                </td>
                                <td>
                                    <s:property value="companyname" />
                                </td>
                                <td>
                                    <s:property value="statusTrans" />
                                </td>
                                <td>
                                    <s:property value="creation" />
                                </td>
                                <td>
                                    <s:if test="updated == true">
                                        <img src="${pageContext.request.contextPath}/Imagenes/accept.png" />
                                    </s:if>
                                </td>
                                <td>
                                    <s:if test="%{#session.usuarioSession.Tran == true}">
                                        <s:a cssClass="buttonTablaAssign" action="SelectComboKnkey">
                                            <input type="button" value="Detail"/>
                                            <s:param name="knkey2" value="knkey"></s:param>
                                            <s:param name="companyname" value="companyname"></s:param>
                                            <s:param value="false" name="exportar"/>
                                        </s:a>
                                    </s:if>
                                    <s:elseif test="%{#session.usuarioSession.Impl == true}">
                                        <s:a cssClass="buttonTablaAssign" action="SelectComboKnkey1">
                                            <input type="button" value="Detail"/>
                                            <s:param name="knkey2" value="knkey"></s:param>
                                            <s:param name="companyname" value="companyname"></s:param>
                                            <s:param value="false" name="exportar"/>
                                        </s:a>
                                    </s:elseif>
                                    <s:elseif test="%{#session.usuarioSession.COP == true}">
                                        <s:a cssClass="buttonTablaAssign" action="SelectComboKnkey2">
                                            <input type="button" value="Detail"/>
                                            <s:param name="knkey2" value="knkey"></s:param>
                                            <s:param name="companyname" value="companyname"></s:param>
                                            <s:param value="false" name="exportar"/>
                                        </s:a>
                                    </s:elseif>
                                </td>
                            </tr>
                        </s:iterator>
                    </table>
                    </br>
                    </br>
                    </br>
                </div>

                <table align="center"><tr><td>

                        </td></tr>
                </table> 
                                                                  
            </s:form>
        </s:div>

        <s:div cssClass="divBlanco"></s:div>
        <s:div cssClass="contenidoAzul">
            <jsp:include page="/jsp/pie.jsp" flush="true" />
        </s:div>
    </body>
</html>
